// kX Driver / kX Driver Interface / kX Driver Effects Library
// Copyright (c) Eugene Gavrilov and eYagos. 2001-2005.
// All rights reserved

/*
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

// 10kX microcode

// Patch name: 'wavegen2'

char *wavegen2_copyright="by eYagos - Copyright (c) 2002. All rights reserved";
char *wavegen2_engine="kX";
char *wavegen2_comment="Wave Generator 2.0: Sine, Square, Triangle, Sawtooth and White Noise. Triangle only works fien at frecuencies lower than 12kHz.";
char *wavegen2_created="10/27/2002";
char *wavegen2_guid="e6580857-eb69-45a6-bb78-9ecf4f74eeb0";

char *wavegen2_name="Wave Generator 2.0";
int wavegen2_itramsize=0,wavegen2_xtramsize=0;

#define	R_Level	0x8005u	
#define	R_PT	0x8006u
#define	R_PS	0x8007u
#define R_y2	0x8008u
#define R_y1	0x8009u
#define R_d	0x800au

dsp_register_info wavegen2_info[]={
	{ "Sinsoid",0x8000,0x8,0xffff,0x0 },
	{ "Square",0x8001,0x8,0xffff,0x0 },
	{ "Triangular",0x8002,0x8,0xffff,0x0 },
	{ "Sawtooth",0x8003,0x8,0xffff,0x0 },
	{ "Noise",0x8004,0x8,0xffff,0x0 },
	{ "LEVEL",0x8005,0x4,0xffff,0x1fffffff },
	{ "PT",0x8006,0x4,0xffff,0x5555555 },
	{ "PS",0x8007,0x4,0xffff,0x2aaaaaa },
	{ "y2",0x8008,0x1,0xffff,0x7fffffff },
	{ "y1",0x8009,0x1,0xffff,0x7fffffff },
	{ "d",0x800a,0x4,0xffff,0x7fb9d757 },
	{ "oc",0x800b,0x1,0xffff,0x7fffffff },
	{ "ot",0x800c,0x1,0xffff,0x7fffffff },
	{ "os",0x800d,0x1,0xffff,0x7fffffff },
	{ "dos",0x800e,0x1,0xffff,0x7fffffff },
	{ "sin",0x800f,0x3,0xffff,0x0 },
	{ "tmp",0x8010,0x3,0xffff,0x0 },
	{ "tmp1",0x8011,0x3,0xffff,0x0 },
};

dsp_code wavegen2_code[]={
	{ 0x0,0x800f,0x2040,0x800a,0x8009 },
	{ 0x1,0x800f,0x800f,0x8008,0x204d },
	{ 0x4,0x800f,0x2040,0x800f,0x2042 },
	{ 0x0,0x8008,0x8009,0x2040,0x2040 },
	{ 0x0,0x8009,0x800f,0x2040,0x2040 },
	{ 0x0,0x8000,0x2040,0x800f,0x8005 },
	{ 0x9,0x8010,0x8000,0x204f,0x2040 },
	{ 0x0,0x8001,0x2040,0x8010,0x8005 },
	{ 0x0,0x8011,0x204f,0x800b,0x8010 },
	{ 0xf,0x2057,0x2057,0x2048,0x2043 },
	{ 0x0,0x800c,0x8010,0x2040,0x2040 },
	{ 0x0,0x800e,0x2040,0x800e,0x204e },
	{ 0xb,0x800d,0x800e,0x800d,0x204f },
	{ 0x0,0x800b,0x8010,0x2040,0x2040 },
	{ 0x1,0x800c,0x800c,0x8006,0x800b },
	{ 0x0,0x8002,0x2040,0x800c,0x8005 },
	{ 0x1,0x800d,0x800d,0x8007,0x204f },
	{ 0x0,0x8003,0x2040,0x800d,0x8005 },
	{ 0x0,0x8004,0x2040,0x2058,0x8005 },
	{ 0x4,0x8004,0x2040,0x8004,0x2042 },
};

